<!-- 文章详情页 -->
@extends('layout')

@section('content')
<div id="main" class="post" itemscope itemprop="blogPost" style="margin: 2em auto;float: unset;width: 85%;">
    <article itemprop="articleBody">
        <!-- 文章详情头部 -->
        <header class="article-info clearfix">
            <h1 itemprop="name">
                <a href="/article/{{ $article->id }}" title="{{ $article->title }}" itemprop="url">{{ $article->title }}</a>
            </h1>
            <!-- <p class="article-author">By
                <a href="https://gitee.yuguofu" title="听雨">听雨</a>
            </p> -->
            <p class="article-time" style="font-size: 10px;float: right;">
                <time datetime="{{ $article->created_at }}" itemprop="datePublished">{{ $article->created_at }}</time>
                &nbsp;&nbsp;&nbsp;&nbsp;更新：<time datetime="{{ $article->updated_at }}" itemprop="dateModified">{{ $article->updated_at }}</time>
            </p>


        </header>

        <div class="article-content">
            <!-- 简介 -->
            <div style="border: 1px dashed #808080;text-align: center;border-left: none;border-right: none;">
                <p style="margin: 0;padding: 10px 0;color: #009fcc;">{{ $article->description }}</p>
            </div>

            <!-- 文章内容  -->
            <style>
                #article-content * {
                    margin-top: unset;
                    margin-bottom: unset;
                }
            </style>
            <div id="article-content" style="margin: 20px 0;">
                {!! $article->content !!}
            </div>
        </div>


        <footer class="article-footer clearfix">
            <!-- 所属分类 -->
            <div class="article-categories">
                <span></span>
                <a class="article-category-link" href="/category/{{ $article->category->id }}">{{ $article->category->name }}</a>
            </div>
            <!-- 所含标签 -->
            <div class="article-tags">
                @foreach($article->tags as $tag)
                <span></span> <a href="/tag/{{ $tag->id }}">{{ $tag->name }}</a>
                @endforeach
            </div>
        </footer>
    </article>

</div>

@endsection